package com.ruoyi.system.service.impl;

import java.util.List;
import cn.hutool.core.util.ObjectUtil;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ADictBudgetMapper;
import com.ruoyi.system.domain.ADictBudget;
import com.ruoyi.system.service.IADictBudgetService;

/**
 * 字典房屋租金预算Service业务层处理
 *
 * @author gf
 * @date 2024-11-23
 */
@Service
public class ADictBudgetServiceImpl implements IADictBudgetService {
    @Autowired
    private ADictBudgetMapper aDictBudgetMapper;

    /**
     * 查询字典房屋租金预算
     *
     * @param id 字典房屋租金预算主键
     * @return 字典房屋租金预算
     */
    @Override
    public ADictBudget selectADictBudgetById(Long id) {
        return aDictBudgetMapper.selectADictBudgetById(id);
    }

    /**
     * 查询字典房屋租金预算列表
     *
     * @param aDictBudget 字典房屋租金预算
     * @return 字典房屋租金预算
     */
    @Override
    public List<ADictBudget> selectADictBudgetList(ADictBudget aDictBudget) {
        return aDictBudgetMapper.selectADictBudgetList(aDictBudget);
    }

    /**
     * 新增字典房屋租金预算
     *
     * @param aDictBudget 字典房屋租金预算
     * @return 结果
     */
    @Override
    public int insertADictBudget(ADictBudget aDictBudget) {
        aDictBudget.setCreateTime(DateUtils.getNowDate());
        return aDictBudgetMapper.insertADictBudget(aDictBudget);
    }

    /**
     * 修改字典房屋租金预算
     *
     * @param aDictBudget 字典房屋租金预算
     * @return 结果
     */
    @Override
    public int updateADictBudget(ADictBudget aDictBudget) {
        aDictBudget.setUpdateTime(DateUtils.getNowDate());
    return aDictBudgetMapper.updateADictBudget(aDictBudget);
    }

    /**
     * 批量删除字典房屋租金预算
     *
     * @param ids 需要删除的字典房屋租金预算主键
     * @return 结果
     */
    @Override
    public int deleteADictBudgetByIds(Long[] ids) {
        return aDictBudgetMapper.deleteADictBudgetByIds(ids);
    }

    /**
     * 删除字典房屋租金预算信息
     *
     * @param id 字典房屋租金预算主键
     * @return 结果
     */
    @Override
    public int deleteADictBudgetById(Long id) {
        return aDictBudgetMapper.deleteADictBudgetById(id);
    }

    /**
     * 批量逻辑删除字典房屋租金预算
     *
     * @param ids 需要删除的字典房屋租金预算主键
     * @return 结果
     */
    @Override
    public int logicDeleteADictBudgetByIds(Long[] ids) {
        return aDictBudgetMapper.logicDeleteADictBudgetByIds(ids);
    }
    /**
     * 逻辑删除字典房屋租金预算信息
     *
     * @param id 字典房屋租金预算主键
     * @return 结果
     */
    @Override
    public int logicDeleteADictBudgetById(Long id) {
        return aDictBudgetMapper.logicDeleteADictBudgetById(id);
    }

    @Override
    public List<ADictBudget> selectADictBudgetXcxList() {
        return aDictBudgetMapper.selectADictBudgetXcxList();
    }

    @Override
    public List<ADictBudget> selectADictBudgetAllList() {
        return aDictBudgetMapper.selectADictBudgetXcxList();
    }

}
